const { MongoClient } = require('mongodb');
const url = 'mongodb://123.60.37.66:10040';
const client = new MongoClient(url);
const dbName = 'c8';
async function main(table) {
    await client.connect();
    console.log('Connected successfully to server');
    const db = client.db(dbName);
    const collection = db.collection(table);
    return collection;
}
module.exports = main